﻿using System;
using System.ComponentModel.DataAnnotations;

namespace GuRenFang.Service.Entity
{
   public class News
    {
       [Key]
       public int Id { get; set; }
       
       [Required(ErrorMessage = "必须填写标题")]
       [StringLength(50, ErrorMessage = "标题必须在50个字符范围内")]
       [Display(Name = "标题")]
       public string Title { get; set;}

       [Required(ErrorMessage = "必须填写内容")]
       [Display(Name="内容")]
       public string Content { get; set; }

       
       public DateTime CreatedTime { get; set; }

       public int ReadTimes { get; set; }
    }
}
